package org.doubango.FrCall.Screens;

import org.doubango.FrCall.Engine;
import org.doubango.FrCall.R;
import org.doubango.FrCall.Services.IScreenService;

import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.Spinner;

public class ScreenSetRegion extends BaseScreen {
	
	private static final String TAG = BaseScreen.class.getCanonicalName();
	private final IScreenService mScreenService;
	private Button backToEditViewFromSetRegionView;
	private Spinner s;
	public ScreenSetRegion() {
		super(SCREEN_TYPE.SET_REGION, TAG);
		mScreenService = ((Engine)Engine.getInstance()).getScreenService();
	}

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.screen_set_region);
		s=(Spinner) findViewById(R.id.edit_region);
		backToEditViewFromSetRegionView = (Button) findViewById(R.id.back_to_edit_view_from_set_region_view);
		backToEditViewFromSetRegionView.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				mScreenService.show(ScreenPersonalInfo.class);
			}
		});
		ArrayAdapter<String> selectRegionAdapter = new ArrayAdapter<String>(ScreenSetRegion.this, R.layout.select_region_item, R.id.select_region, new String[]{"北京","上海","郑州"});
		s.setAdapter(selectRegionAdapter);
	}
	

}
